#pragma once


#define INDEXTILECOORDINATES(x, y) ((x*y)+(x-y))
#define INDEXTILESCREENCOORDINATES(x, y) ((x*y)+y)

#define TRANSPARENT_8BITS (c) (c&0xFF)
#define TRANSPARENT_32BITS (c) ((c>>0x18)&0xFF)

typedef struct{
	UUID uuid;
} tMapHeader;

typedef struct{
	unsigned long SizeOfTextures;
} tTextureTypeSpecificsHeader;

typedef struct{
	unsigned long ulWidth,
		ulHeight;
	char TIDs[];
} tTileToTextureMap;

typedef struct{
	unsigned long TID;
	unsigned char TexturePixelData[];
} tTexture;

typedef union tPixel{
	unsigned long VALUE;
	struct RGB{
		char transparent,
			red,
			green,
			blue;
	};
}